﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Probnik_chtenie_iz_text
{
    class Program
    {
        static void Main(string[] args)
        { int k =0;
         
         string s = File.ReadAllText("TextFile1.txt");
         string[] str = s.Split(' ','\n');
         string[] str1= File.ReadAllLines("TextFile1.txt");
         string[] str2 = str1[0].Split(' ');
         int[,] a = new int[str1.Length, str2.Length];       
         for (int i = 0; i < str1.Length; i++)
         {
             for (int j = 0; j < str2.Length; j++)
             {
                 a[i, j] =int.Parse( str[k]);
                 k++;
             }
         }      
         for (int i = 0; i < str1.Length; i++)
         {
             for (int j = 0; j < str2.Length; j++)
             {
                 Console.Write(a[i, j] + " ");
             }
             Console.WriteLine();
         }
         Console.ReadLine();
        }
    }
}
         